package com.zzyl.controller;

import com.zzyl.base.ResponseResult;
import com.zzyl.dto.MemberLoginDTO;
import com.zzyl.service.MemberService;
import com.zzyl.vo.MemberVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags="微信小程序用户登录")
public class MemberController {
    @Autowired
    private MemberService memberService;
    @PostMapping("/customer/user/login")
    @ApiOperation("微信小程序用户登录")
    public ResponseResult<MemberVo> login(@RequestBody MemberLoginDTO dto){
        MemberVo vo=   memberService.login(dto);
        return ResponseResult.success(vo);
    }
}
